# 销售统计

spbh=input("输入商品代码")
s=0
c=0
sl=0

while spbh != "0000":
    price = eval(input("输入商品价格"))
    quantity = eval(input("输入商品数量"))
    c += 1
    sl += quantity
    s += quantity * price
    spbh = input("输入商品代码")

print("商品种类{}数量总计{}金额总计{:.2f}".format(c,sl,s))
